﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Chromos.AIEngine;
using Chromos.ActionEngine;

namespace Chromos.Actors
{
	public abstract class Enemy : Actor
	{
		public Enemy(Game1 game, Vector2 position, Vector2 velocity, ContentManager content, bool isStatic, string aggressiveness)
			: base(game, position, velocity, content, isStatic)
		{
		}

		protected override void initActorFields()
		{
			this.mass = 50;
		}

		/*public void move()
		{
			this.position.X += this.velocity.X;
		}*/

		public void setEnemy(float buffer)
		{
			this.position.X += (int)buffer;
		}

		public List<Chromos.ActionEngine.AttackAction> getAttacks()
		{
			return actionEngine.getAttacks();
		}

		public override void collidedProjectile(Projectile p)
		{
			if (p.firingActor != this)
			{
				this.health -= p.power;
				p.health -= p.power;
				// Simulated exchange of energy (bounding box size is representitive of mass)
				this.velocity.X += p.velocity.X / ((float)this.mass) * ((float)p.mass);
			}
		}
	}
}